//
//  HWMyinformationModel.m
//  嗨文
//
//  Created by 响当当 on 2019/1/11.
//  Copyright © 2019年 dongzheng. All rights reserved.
//

#import "HWMyinformationModel.h"

@implementation HWMyinformationModel

- (id)initWithDic:(NSDictionary *)dic
{
    if (self = [super init])
    {
        self.amount = [[NSString stringWithFormat:@"%@",dic[@"amount"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"amount"]] :@"";
        self.role = [[NSString stringWithFormat:@"%@",dic[@"role"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"role"]] :@"";
        self.headImg = [dic[@"headImg"] isValidString] ? dic[@"headImg"] :@"";
        self.gender = [[NSString stringWithFormat:@"%@",dic[@"gender"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"gender"]] :@"";
        self.nickName = [dic[@"nickName"] isValidString] ? dic[@"nickName"] :@"";
        self.goldCoin = [[NSString stringWithFormat:@"%@",dic[@"goldCoin"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"goldCoin"]] :@"";
        self.phoneNum = [dic[@"phoneNum"] isValidString] ? dic[@"phoneNum"] :@"";
        self.outUserId = [[NSString stringWithFormat:@"%@",dic[@"outUserId"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"outUserId"]] :@"";
        self.bookCoin = [[NSString stringWithFormat:@"%@",dic[@"bookCoin"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"bookCoin"]] :@"";
        self.isVip = IFNULL(dic[@"isVip"], [NSNumber new]);
        self.parentId = [[NSString stringWithFormat:@"%@",dic[@"parentId"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"parentId"]] :@"";
        self.master = [[NSString stringWithFormat:@"%@",dic[@"master"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"master"]] :@"";
        self.agentLevelName = [[NSString stringWithFormat:@"%@",dic[@"agentLevelName"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"agentLevelName"]] :@"";
        self.readDueTime = [[NSString stringWithFormat:@"%@",dic[@"readDueTime"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"readDueTime"]] :@"";
        self.agentWallet = [[NSString stringWithFormat:@"%@",dic[@"agentWallet"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"agentWallet"]] :@"";
        self.agentLevelNo = [[NSString stringWithFormat:@"%@",dic[@"agentLevelNo"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"agentLevelNo"]] :@"";
    }
    return self;
}
@end
